package com.zx.factory;

import com.zx.annotations.Service;
import com.zx.annotations.Transactional;

import java.lang.annotation.Annotation;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;

/**
 * @ProjectName: iocaop
 * @Package: com.zx.factory
 * @ClassName: BeanDefinition
 * @Author: 1
 * @Description: 1
 * @Date: 2021/9/16 8:00
 */
public class BeanDefinition<T> {

    /** id **/
    private String id;


    private String className;

    private Class<T> aClass;

    private Constructor<T> constructor;

    private Class<?>[] interfaces;

    /** 字段 **/
    private  Field[] declaredFields;

    /** 类上的注解 **/
    private Annotation[] annotations;

    private Service service;

    private Transactional transactional;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public Class<T> getaClass() {
        return aClass;
    }

    public void setaClass(Class<T> aClass) {
        this.aClass = aClass;
    }

    public Constructor<T> getConstructor() {
        return constructor;
    }

    public void setConstructor(Constructor<T> constructor) {
        this.constructor = constructor;
    }

    public Class<?>[] getInterfaces() {
        return interfaces;
    }

    public void setInterfaces(Class<?>[] interfaces) {
        this.interfaces = interfaces;
    }

    public Field[] getDeclaredFields() {
        return declaredFields;
    }

    public void setDeclaredFields(Field[] declaredFields) {
        this.declaredFields = declaredFields;
    }

    public Annotation[] getAnnotations() {
        return annotations;
    }

    public void setAnnotations(Annotation[] annotations) {
        this.annotations = annotations;
    }

    public Service getService() {
        return service;
    }

    public void setService(Service service) {
        this.service = service;
    }

    public Transactional getTransactional() {
        return transactional;
    }

    public void setTransactional(Transactional transactional) {
        this.transactional = transactional;
    }
}
